home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 0669.ZIP / ENCRYPT.PRG < prev    next >
Text File  |  1985-12-30  |  896b  |  22 lines

  1. * PROGRAM.....ENCRYPT.PRG
  2. * AUTHOR......MIKE COTICCHIO
  3. * NOTES.......Encryption routine for SETPASS.PRG
  4.  
  5. parameters oldword,newword
  6. store len(oldword) to loopcnt,encodekey
  7. store 0 to currletter
  8. store space(1) to newword
  9.  
  10. **** The password is parsed letter by letter, and the ASCII value ****
  11. **** of the letter is increased by a value equal to the size of   ****
  12. **** the password.  The new ASCII value is then converted back to ****
  13. **** a character, and the new character is concatenated onto the  ****
  14. **** encrypted password                                           ****
  15.  
  16. do while currletter < loopcnt
  17. currletter = currletter+1
  18. store asc(substr(oldword,currletter)) + encodekey to newletter
  19. newword = trim(newword) + chr(newletter)
  20. enddo
  21. return
  22.